package CodeTwo;

import java.util.Scanner;

/** @author ASUS */
public class Pullpaper {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int m = 0;
    // 纸片数目
    int count = scan.nextInt();
    // 数字之和
    int sum = scan.nextInt();

    int[] a = new int[count];
    for (int i = 0; i < count; i++) {
      // 纸片上的数字
      a[i] = scan.nextInt();
    }
    scan.close();
    loop1:
    for (int i = 0; i < count; i++) {
      // 最简单的思路：三重for循环
      for (int j = i + 1; j < count; j++) {
        for (int k = j + 1; k < count; k++) {
          // 计算三张纸片之和
          int temp = a[i] + a[j] + a[k];
          if (temp == sum) {
            // 若相等
            System.out.println("Y");
            // 用m标记
            m = 1;
            break loop1;
          }
        }
      }
    }
    if (m == 0) {
      System.out.println("N");
    }
  }
}
